#include <stdio.h>

int main() {
    float base_salary = 500;  // 保底薪水
    float profit, commission, total_salary;
    
    printf("请输入工程利润(元): ");
    scanf("%f", &profit);
    
    // 计算提成
    if (profit <= 1000) {
        commission = 0;
    } else if (profit <= 2000) {
        commission = (profit - 1000) * 0.10;
    } else if (profit <= 5000) {
        commission = 1000 * 0.10 + (profit - 2000) * 0.15;
    } else if (profit <= 10000) {
        commission = 1000 * 0.10 + 3000 * 0.15 + (profit - 5000) * 0.20;
    } else {
        commission = 1000 * 0.10 + 3000 * 0.15 + 5000 * 0.20 + (profit - 10000) * 0.25;
    }
    
    total_salary = base_salary + commission;
    
    printf("保底薪水: %.2f元\n", base_salary);
    printf("提成金额: %.2f元\n", commission);
    printf("总工资: %.2f元\n", total_salary);
    
    return 0;
}